function login() {
    let  data={
        username:$("#username").val(),
        password:$("#password").val(),
        code:$("#code").val()
    };
    $.ajax({
        url:'/login',
        data:data,
        dataType:'json',
        type:'post',
        success:function (data) {
            console.log(data);
            if (data.result=='error_code'){
                alert("验证码或用户名密码不正确不正确，请重新输入");
                
            // }else if (data.result=='error') {
            //         alert("用户名或密码不正确，请重新输入");
                }
                else{
                location.href="/html/manage.html";
                // window.open("/html/manage.html");
            }


        }



    })
}